#include "show_followed_unit.h"

QString showFollowedUnit(qint64 Size)
{
    QString strSize;
    if(Size<1024)
    {
        strSize=QString::number(Size,'f',3)+"bytes";
    }
    else if(Size<1048576)
    {
        strSize=QString::number(Size/1024.0,'f',3)+"KB";
    }
    else if(Size<1073741824)
    {
        strSize=QString::number(Size/1048576.0,'f',3)+"MB";
    }
    else if(Size<1099511627776)
    {
        strSize=QString::number(Size/1073741824.0,'f',3)+"GB";
    }
    else
    {
        strSize=QString::number(Size/1099511627776.0,'f',3)+"GB";
    }
    return strSize;
}
